#include <stdio.h>
int main()
{
	int x,i=0,sum=0;
	scanf("%d",&x);
	while(1)
	{
		sum+=x%10;
		x/=10;
		if (x==0) break;
	}
	printf("sum=%d\n",sum);
	return 0;
}

